﻿package com.lhk.appframework.utils.ui;

import android.view.View;
import android.view.ViewGroup.LayoutParams;

public class UtilsWidget {
	public UtilsWidget()
	{
		/* cannot be instantiated */
		throw new UnsupportedOperationException("cannot be instantiated");
	}
	
	// 不改变控件位置，修改控件大小
	public static void changeWH(View v,int W,int H)
	{
		LayoutParams params = (LayoutParams)v.getLayoutParams();
	    params.width = W;
	    params.height = H;
	    v.setLayoutParams(params);
	}
	
	// 修改控件的高
	public static void changeH(View v,int H)
	{
		LayoutParams params = (LayoutParams)v.getLayoutParams();
	    params.height = H;
	    v.setLayoutParams(params);
	}
		
}
